Skip to content

Bug cov nat #60898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Bug cov nat #60898

wants to merge 15 commits into from

Conversation

fbourgey
Copy link
Contributor

@fbourgey fbourgey commented Feb 9, 2025

@WillAyd WillAyd added Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Feb 14, 2025
@fbourgey
Copy link
Contributor Author

@jbrockmendel, @WillAyd, could you please take a look?

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - @jbrockmendel anything else on your end?

@mroeschke mroeschke requested a review from jbrockmendel May 16, 2025 15:55
@fbourgey
Copy link
Contributor Author

@jbrockmendel, I made the updates

Comment on lines 11356 to 11357
dtypes = [blk.dtype for blk in self._mgr.blocks]
if any(d.kind in "mM" for d in dtypes):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dtypes = [blk.dtype for blk in self._mgr.blocks]
if any(d.kind in "mM" for d in dtypes):
if any(blk.dtype.kind in "mM" for blk in self._mgr.blocks):

@mroeschke mroeschke added this to the 3.0 milestone May 22, 2025
],
}
)
arr = np.array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
arr = np.array(
expected = np.array(

[np.nan, 8.64e04, 2.00e00],
]
)
assert np.allclose(df.to_numpy(float, na_value=np.nan), arr, equal_nan=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert np.allclose(df.to_numpy(float, na_value=np.nan), arr, equal_nan=True)
result = df.to_numpy(float, na_value=np.nan),
tm.assert_numpy_array_equal(result, expected)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: cov buggy when having NaT in column
4 participants